<h1><%= link_to(h(@list.title), '/', :target => '_top') %></h1>

<%= link_to 'Add entry', "/lists/#{@list.id}/entries/new", :id => 'add_entry', :target => '_top' %>
<%= link_to 'Edit entries', '#', :id => 'edit_entries' %>

<% if (@unread_entries.length > 0) %>
  <ol class="entries unread">
  <% for entry in @unread_entries %>
    <li class="status<%= entry.status %> <%= cycle("even", "odd") %>">
      <%= link_to 'Destroy', entry, :confirm => 'Are you sure?', :method => :delete, :class => 'destroy', :target => '_top' %>
      <%= link_to 'Edit', edit_entry_path(entry), :class => 'edit', :target => '_top' %>
      <%= link_to(h(entry.display_title), "/read/#{entry.id}", :class => 'entry onclick_removeme', :target => '_blank', :style => "background-image: url(#{entry.favicon})") %>
    </li>
  <% end %>
  </ol>
<% else %>
  <h2 class="notice">Nothing to read, <a href="/lists/<%= @list.id %>/entries/new" target="_top">add something</a></h2>
<% end %>

<h2>Recently read entries</h2>
<ol class="entries read">
<% for entry in @list.read_entries (10) %>
  <li class="status<%= entry.status %>">
    <%= link_to 'Destroy', entry, :confirm => 'Are you sure?', :method => :delete, :class => 'destroy', :target => '_top' %>
    <%= link_to 'Edit', edit_entry_path(entry), :class => 'edit', :target => '_top' %>
    <%= link_to(h(entry.display_title), entry.url, :class => 'entry', :target => '_blank') %>
  </li>
<% end %>
</ol>
<h2>Bookmarklets</h2>
<ul>
  <li><a href="javascript:var%20d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://<%= request.host %>/s',l=d.location,e=encodeURIComponent,p='?lid=<%= @list.id %>&v=1&u='+e(l.href)%20+'&t='+e(d.title)%20+'&s='+e(s),u=f+p;try{if(!/^(.*\.)?instapaper([^.]*)?$/.test(l.host))throw(0);iptstbt();}catch(z){a%20=function(){if(!w.open(u,'t','toolbar=0,resizable=0,status=1,width=250,height=300'))l.href=u;};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();}void(0)">Add to <%= @list.title %></a></li>
  <li><a href="javascript:var%20d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://<%= request.host %>/n',l=d.location,e=encodeURIComponent,p='?lid=<%= @list.id %>&v=1&u='+e(l.href)%20+'&t='+e(d.title)%20+'&s='+e(s),u=f+p;try{if(!/^(.*\.)?instapaper([^.]*)?$/.test(l.host))throw(0);iptstbt();}catch(z){a%20=function(){l.href=u;};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();}void(0)">Next in <%= @list.title %></a></li>
</ul>